package global {
	
	import UnityEngine._Object;
	import UnityEngine.Camera;
	import UnityEngine.CharacterController;
	import UnityEngine.Input;
	import UnityEngine.MonoBehaviour;
	import UnityEngine.Vector3;
	import UnityEngine.Serialization.IDeserializable;
	import UnityEngine.Serialization.PPtrRemapper;
	import UnityEngine.Serialization.SerializedStateReader;
	import UnityEngine.Serialization.SerializedStateWriter;
	import System.Type;
	
	public class TP_Controller extends MonoBehaviour implements IDeserializable {
		
		public static var TP_Controller$characterController$: CharacterController;
		
		public static var TP_Controller$instance$: TP_Controller;
		
		public function TP_Controller_Awake(): void {
			TP_Controller$characterController$ = this.Component_GetComponent_String("CharacterController") as CharacterController;
			TP_Controller$instance$ = this;
		}
		
		public function TP_Controller_Update(): void {
			if (!_Object.Object_op_Equality_Object_Object(Camera.mainCamera, null)) {
				this.TP_Controller_GetLocomotionInput();
				TP_Motor.TP_Motor$instance$.TP_Motor_UpdateMotor();
			}
		}
		
		public function TP_Controller_GetLocomotionInput(): void {
			var $num: Number = 0.1;
			TP_Motor.TP_Motor$instance$.TP_Motor$moveVector$.cil2as::Assign(Vector3.zero);
			if ((Number(Input.Input_GetAxis_String("Vertical")) > $num) || (Number(Input.Input_GetAxis_String("Vertical")) < (-$num))) {
				TP_Motor.TP_Motor$instance$.TP_Motor$moveVector$.cil2as::Assign(Vector3.op_Addition_Vector3_Vector3(TP_Motor.TP_Motor$instance$.TP_Motor$moveVector$, new Vector3().Constructor_Single_Single_Single(Number(0), Number(0), Input.Input_GetAxis_String("Vertical"))));
			}
			if ((Number(Input.Input_GetAxis_String("Horizontal")) > $num) || (Number(Input.Input_GetAxis_String("Horizontal")) < (-$num))) {
				TP_Motor.TP_Motor$instance$.TP_Motor$moveVector$.cil2as::Assign(Vector3.op_Addition_Vector3_Vector3(TP_Motor.TP_Motor$instance$.TP_Motor$moveVector$, new Vector3().Constructor_Single_Single_Single(Input.Input_GetAxis_String("Horizontal"), Number(0), Number(0))));
			}
		}
		
		cil2as static function DefaultValue(): TP_Controller {
			return new TP_Controller().TP_Controller_Constructor();
		}
		
		public function Deserialize(reader: SerializedStateReader): void {
		}
		
		public function Serialize(writer: SerializedStateWriter): void {
		}
		
		public function RemapPPtrs(remapper: PPtrRemapper): void {
		}
		
		public function TP_Controller_Constructor(): TP_Controller {
			this.MonoBehaviour_Constructor();
			return this;
		}
		
		public static function get $Type(): System.Type {
			return _$Type != null ? _$Type : (_$Type = new System.Type(TP_Controller, {"Awake" : "TP_Controller_Awake", "Update" : "TP_Controller_Update", "GetLocomotionInput" : "TP_Controller_GetLocomotionInput"}, MonoBehaviour.$Type));
		}
		
		public static var _$Type: System.Type;
	}
}
